﻿function gmobj(mtxt) { if (document.getElementById) { m = document.getElementById(mtxt) } else if (document.all) { m = document.all[mtxt] } else if (document.layers) { m = document[mtxt] } return m; }

function CheckDomain(Domain,Ext,divID) {
    AjaxRequest.get(
    {
        "url": "Whois.ashx?Domain=" + Domain + "&ext=" + Ext
        , 'onLoading': function() {
        gmobj(divID).innerHTML = "<img src=\"medium_load.gif\" border=\"0\" />"
        }
	    , 'onSuccess': function(req) {
	        var strResponse = req.responseText;
	        if (strResponse == "1") {
	            gmobj(divID).innerHTML = "<a title=\"Show information!\" href=\"javascript:;\" onclick=\"windowPrompt('', { href: 'Infomation.aspx?domain=" + Domain + "&ext=" + Ext + "', iframe: true, width: 700, height: 500 });\"><span style=\"color:red;\"><img src=\"infoma.png\" border=\"0\" />&nbsp;Đã đăng ký</span> </a>";
	        } else {
    	        gmobj(divID).innerHTML = "<span style=\"color:green;\">Not register</span>";
	        }
	    }
	    , 'onError': function(req) {
	        gmobj(divID).innerHTML = req.statusText;
	    }
    });
}

